import request from '@/utils/request'
import URL from '@/api/baseUrl'
export default class ImportTemplate {
  /**
   * 查询列表
   */
  static list(data = {}) {
    return request.get(`${URL.comBasic}/bas-import-template/list`, data)
  }

  /**
   * 查询详情
   */
  static getInfo(id) {
    return request.get(`${URL.comBasic}/bas-import-template/getInfo/${id}`)
  }
  /**
   * 删除
   */
  static remove(ids) {
    return request.delete(`${URL.comBasic}/bas-import-template/remove`, ids)
  }
  /**
   * 新增
   */
  static add(data = {}) {
    return request.post(`${URL.comBasic}/bas-import-template/add`, data)
  }
  /**
   * 修改
   */
  static edit(data = {}) {
    return request.put(`${URL.comBasic}/bas-import-template/edit`, data)
  }

  static noPageList(data = {}) {
    return request.get(`${URL.comBasic}/bas-import-template/noPageList`, data)
  }

  static noPageList(data = {}) {
    return request.get(`${URL.comBasic}/bas-import-template/noPageList`, data)
  }

  static previewExcel(data = {}) {
    return request.post(`${URL.comBasic}/bas-import-template/previewExcel`, data, {
      headers: {
        "Content-Type": "multipart/form-data",
      }
    })
  }

  static previewExcelWithExistFile(data = {}) {
    return request.post(`${URL.comBasic}/bas-import-template/previewExcelWithExistFile`, data)
  }
}
